package com.hhss.qishi.DPtest.designpattern.factory.store;

import com.hhss.qishi.DPtest.designpattern.factory.pizza.Pizza;

/**
 * 披萨店超类（加盟总店）
 */
public abstract class PizzaStore {

    /**
     * 订披萨
     * @param pizzaTypa
     * @return
     */
    public Pizza orderPizza(String pizzaTypa){
        Pizza pizza = createPizza(pizzaTypa);
        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();
        return pizza;
    }

    /**
     * 生产披萨
     * @param pizzaTypa
     * @return
     */
    abstract Pizza createPizza(String pizzaTypa);
}
